<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSchoolClassCoursesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('school_class_courses', function (Blueprint $table) {
            $table->id();

            $table->unsignedInteger('school_id')->comment("学校id");
            $table->unsignedInteger('class_grades_id')->comment("班级id");
            $table->unsignedInteger('course_id')->comment("课程id");

            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('school_class_courses');
    }
}
